﻿
using System.Collections.Generic;
using KL.Standard.Model.Models;
using KL.Standard.Model.Models.BaseArch;

namespace KL.Standard.Domain.Repositories
{
    public interface IAttachRepository
    {
        /// <summary>
        /// 添加附件
        /// </summary>
        /// <param name="info"></param>
        /// <returns></returns>
        Task<int> AddAttachment(List<SysAttachmentPO> info);
        /// <summary>
        /// 删除附件
        /// </summary>
        /// <param name="uID"></param>
        /// <returns></returns>
        int DeleteAttachment(string uID);
        /// <summary>
        /// 查询附件信息
        /// </summary>
        /// <param name="searchInfo"></param>
        /// <returns></returns>
        List<SysAttachmentPO> GetAllAttachments(Dictionary<string, string> searchInfo);
        /// <summary>
        /// 根据主数据id删除记录 
        /// </summary>
        /// <param name="uID"></param>
        Task<int> DeleteAttachment4MainID(string uID);
        /// <summary>
        /// 获取该批次的所有附件记录
        /// </summary>
        /// <param name="bldBatchId"></param>
        /// <returns></returns>
        Task<IEnumerable<SysAttachmentPO>> GetRecordsFromBatchId(string? bldBatchId);
        /// <summary>
        /// 更新同步标识
        /// </summary>
        /// <param name="attachment"></param>
        /// <returns></returns>
        Task<bool> UpSynFlag(SysAttachmentPO attachment);
        /// <summary>
        /// 根据ID 获取附件明细
        /// </summary>
        /// <param name="uId"></param>
        /// <returns></returns>
        Task<SysAttachmentPO> GetDetailsForId(string uId);
    }
}
